package routers

import (
	"SSO/routers/api"
	"SSO/routers/auth"
	"github.com/gin-contrib/sessions"
	"github.com/gin-contrib/sessions/cookie"
	"github.com/gin-gonic/gin"
)

func Register(router *gin.Engine) {
	store := cookie.NewStore([]byte("secret"))
	router.Use(sessions.Sessions("sessionId", store))
	api.Register(router)
	auth.Register(router)
}
